import 'base_model.dart';

/// 搜索页漫画公共model
class SortComicModel extends BaseModel {
  int comicId; // 漫画id
  String comicNewid; // 漫画字符串id
  String comicName; // 漫画名称
  String lastChapterName; // 最后章节名称
  List<dynamic> sortTypeList; // 标签['热血', '神魔', '竞技', '漫改', '精品']
  String coverImg; // 封面图
  int updateTime; // 时间戳，更新时间
  int shoucang; // 收藏，追更

  SortComicModel.fromJson(Map<String, dynamic> data) : super.fromJson(data) {
    comicId = data['comic_id'];
    comicNewid = data['comic_newid'];
    comicName = data['comic_name'];
    lastChapterName = data['last_chapter_name'];
    sortTypeList = data['sort_typelist'];
    coverImg = data['cover_img'];
    updateTime = data['update_time'];
    shoucang = data['shoucang'];
  }

  @override
  Map<String, dynamic> toJson() {
    return {
      'modelState': modelState,
      'comicId': comicId,
      'comicNewid': comicNewid,
      'comicName': comicName,
      'lastChapterName': lastChapterName,
      'sortTypeList': sortTypeList,
      'coverImg': coverImg
    };
  }
}
